-
Notifications
You must be signed in to change notification settings - Fork 1k
fix(docker): fix retrofit2 docker client which is replacing ?
with %3F
causing api failure
#6354
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…r registry apis can be accessed using retrofit2 client and another to demonstrate the issue of retrofit2 replacing `?` with `%3F` causing api failure with 400
…ing api failure with 400
dd964b5
to
5e32a8a
Compare
dbyron-sf
reviewed
Mar 6, 2025
...m/netflix/spinnaker/clouddriver/docker/registry/api/v2/client/DockerRegistryServiceTest.java
Outdated
Show resolved
Hide resolved
dbyron-sf
reviewed
Mar 6, 2025
...m/netflix/spinnaker/clouddriver/docker/registry/api/v2/client/DockerRegistryServiceTest.java
Outdated
Show resolved
Hide resolved
dbyron-sf
reviewed
Mar 6, 2025
.../com/netflix/spinnaker/clouddriver/docker/registry/api/v2/client/DockerRegistryClient.groovy
Outdated
Show resolved
Hide resolved
dbyron-sf
reviewed
Mar 6, 2025
...m/netflix/spinnaker/clouddriver/docker/registry/api/v2/client/DockerRegistryServiceTest.java
Outdated
Show resolved
Hide resolved
…fit2 replacing `?` with `%3F` causing api failure with 400
10897d7
to
9240756
Compare
dbyron-sf
approved these changes
Mar 7, 2025
@Mergifyio backport release-1.37.x |
✅ Backports have been created
|
mergify bot
pushed a commit
that referenced
this pull request
Mar 7, 2025
…`%3F` causing api failure (#6354) * test(docker): add two test classes, one to demonstrate how real docker registry apis can be accessed using retrofit2 client and another to demonstrate the issue of retrofit2 replacing `?` with `%3F` causing api failure with 400 * fix(docker): fix the issue of retrofit2 replacing `?` with `%3F` causing api failure with 400 * fix(docker): address review comments on the fix to the issue of retrofit2 replacing `?` with `%3F` causing api failure with 400 (cherry picked from commit 0210189)
mergify bot
added a commit
that referenced
this pull request
Mar 7, 2025
…`%3F` causing api failure (#6354) (#6355) * test(docker): add two test classes, one to demonstrate how real docker registry apis can be accessed using retrofit2 client and another to demonstrate the issue of retrofit2 replacing `?` with `%3F` causing api failure with 400 * fix(docker): fix the issue of retrofit2 replacing `?` with `%3F` causing api failure with 400 * fix(docker): address review comments on the fix to the issue of retrofit2 replacing `?` with `%3F` causing api failure with 400 (cherry picked from commit 0210189) Co-authored-by: Kiran Godishala <53332225+kirangodishala@users.noreply.github.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
auto merged
Merged automatically by a bot
ready to merge
Approved and ready for a merge
target-release/1.38
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR is to address spinnaker/spinnaker#7015
With retrofit2 being stricter in many ways, API call is failing when the path param contains
?
.Docker registry APIs (tags and catalog) returns paginated responses with next link being sent in the response header. Since the link includes the query parameters but retrofit2 not aware of it replaces
?
with%3F
causing400 Not Found
error.The fix includes parsing the link further to extract the query parameters and send them in the request.
Added tests to demonstrate the issue and to use the real docker registry apis using retrofit2 client.